
#include <boost/program_options.hpp>
namespace po = boost::program_options;

int main(int argc, char **argv)
{
    prog_options options;
    options_set_defaults(options);

    std::string usage = "Usage: comb_simreads [options] reference.fasta";

    po::options_description visible("Command line options");

    visible.add_options()
        ("help", "Produce help message")
        ("length,l", po::value<std::string>(&read_length), "Length of reads to generate")
        ("sequence,s", po::bool_switch(&seq), "Generate sequence space reads. Default is color")
        ("reads,r", po::value<std::string>(&read_file), "File to write reads to")
        ("quals,q", po::value<std::string>(&qual_file), "File to write quals to")
        ("cov,c", po::value<unsigned int>(&coverage), "Coverage")
        ("uniform,u", po::value<double>(&uniform), "Uniform")
        ("positional,p", po::value<double>(&positional), "Positional")
        ("call-file", po::value<std::string>(&call_file), "Call rates file")
    ;

    po::options_description hidden;

    hidden.add_options()
        ("fasta-file", po::value<std::string>(&options.fasta_file), "Genome sequence.")
    ;

    po::options_description desc;

    desc.add(visible).add(hidden);

    po::positional_options_description p;
    p.add("fasta-file", 1);

    po::variables_map vm;
        
    try 
    {
        po::store(po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
        po::notify(vm);
    }
    catch(std::exception &se) 
    {
        std::cerr << usage << std::endl;
        std::cerr << visible << std::endl;
        error("Exception caught! " + std::string(se.what()));
    }



}
